<html>
<head>
<title>Run our php programs</title></head>
<body>
<?php
function classloader($classname)
{
	//works for classes like Shop_Product_Writer
	$path = str_replace("_",DIRECTORY_SEPARATOR,$classname);
	include("$path.php");

}
spl_autoload_register('classloader');

$sp = new Shop_Product_Book();
$producer = $sp->getProducer();
printf("Ham is made by : %s\n",$producer);

$sp2 = new Shop_Product_Book("PHP in practice","Matt","Zandstra",20.00,225);
printf("<br />%s was written by %s",$sp2->title,$sp2->getProducer());
echo($sp2->getSummaryLine());
?>
	<ul><li>Shop<ul><li>Product<ul><li>CD</li><li>Book</li></ul></li></ul></li>
</ul>
</body>
</html>